package com.yonyou.ncmm_pac_pda;

import com.yonyou.uap.um.application.ApplicationContext;
import com.yonyou.uap.um.base.*;
import com.yonyou.uap.um.common.*;
import com.yonyou.uap.um.third.*;
import com.yonyou.uap.um.control.*;
import com.yonyou.uap.um.core.*;
import com.yonyou.uap.um.binder.*;
import com.yonyou.uap.um.runtime.*;
import com.yonyou.uap.um.lexer.*;
import com.yonyou.uap.um.widget.*;
import com.yonyou.uap.um.widget.UmpSlidingLayout.SlidingViewType;
import com.yonyou.uap.um.log.ULog;
import java.util.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.webkit.*;
import android.content.*;
import android.graphics.*;
import android.widget.ImageView.ScaleType;

public abstract class PuInTestActivity extends UMWindowActivity {

	protected UMWindow PuInTest = null;
protected XVerticalLayout viewPage0 = null;
protected UMImage image0 = null;
protected XHorizontalLayout panel0 = null;
protected UMLabel label0 = null;
protected UMTextbox textbox0 = null;
protected UMButton button0 = null;
protected UMListViewBase listviewdefine0 = null;
protected XHorizontalLayout panel2 = null;
protected UMLabel label1 = null;
protected UMLabel label2 = null;
protected UMCheckbox checkbox0 = null;
protected UMButton button1 = null;

	
	protected final static int ID_PUINTEST = 89680708;
protected final static int ID_VIEWPAGE0 = 744010313;
protected final static int ID_IMAGE0 = 1446108090;
protected final static int ID_PANEL0 = 2068105581;
protected final static int ID_LABEL0 = 2112739179;
protected final static int ID_TEXTBOX0 = 1253603942;
protected final static int ID_BUTTON0 = 1741082145;
protected final static int ID_LISTVIEWDEFINE0 = 1621833068;
protected final static int ID_PANEL2 = 1034571147;
protected final static int ID_LABEL1 = 1556979432;
protected final static int ID_LABEL2 = 2081768464;
protected final static int ID_CHECKBOX0 = 348093978;
protected final static int ID_BUTTON1 = 768350509;

	
	
	@Override
	public String getControllerName() {
		return "PuInTestController";
	}
	
	@Override
	public String getContextName() {
		return "";
	}

	@Override
	public String getNameSpace() {
		return "com.yonyou.ncmm_pac_pda";
	}

	protected void onCreate(Bundle savedInstanceState) {
		ULog.logLC("onCreate", this);
		super.onCreate(savedInstanceState);
        onInit(savedInstanceState);
        
	}
	
	@Override
	protected void onStart() {
		ULog.logLC("onStart", this);
		
		super.onStart();
	}

	@Override
	protected void onRestart() {
		ULog.logLC("onRestart", this);
		
		super.onRestart();
	}

	@Override
	protected void onResume() {
		ULog.logLC("onResume", this);
		
		super.onResume();
	}

	@Override
	protected void onPause() {
		ULog.logLC("onPause", this);
		
		super.onPause();
	}

	@Override
	protected void onStop() {
		ULog.logLC("onStop", this);
		
		super.onStop();
	}

	@Override
	protected void onDestroy() {
		ULog.logLC("onDestroy", this);
		
		super.onDestroy();
	}
	
	public  void onInit(Bundle savedInstanceState) {
		ULog.logLC("onInit", this);
		UMActivity context = this;
		registerControl();
		this.getContainer();
		
		/*
		 new Thread() {
			 public void run() {
				 UMPDebugClient.startServer();
			 }
		 }.start();
		*/
		String sys_debug = ApplicationContext.getCurrent(this).getValue("sys_debug");
		if (sys_debug != null && sys_debug.equalsIgnoreCase("true")) {
			UMPDebugClient.waitForDebug();
		}

		IBinderGroup binderGroup = this;
		currentPage = getCurrentWindow(context, binderGroup);
super.setContentView(currentPage);

		
	}
	
	private void registerControl() {
		  idmap.put("PuInTest",ID_PUINTEST);
  idmap.put("viewPage0",ID_VIEWPAGE0);
  idmap.put("image0",ID_IMAGE0);
  idmap.put("panel0",ID_PANEL0);
  idmap.put("label0",ID_LABEL0);
  idmap.put("textbox0",ID_TEXTBOX0);
  idmap.put("button0",ID_BUTTON0);
  idmap.put("listviewdefine0",ID_LISTVIEWDEFINE0);
  idmap.put("panel2",ID_PANEL2);
  idmap.put("label1",ID_LABEL1);
  idmap.put("label2",ID_LABEL2);
  idmap.put("checkbox0",ID_CHECKBOX0);
  idmap.put("button1",ID_BUTTON1);

	}
	
	public void onLoad() {
		ULog.logLC("onLoad", this);
		if(currentPage!=null) {
			currentPage.onLoad();
		}
	
		{ //viewPage0 - action:viewpage0_onload
    UMEventArgs args = new UMEventArgs(PuInTestActivity.this);
    actionViewpage0_onload(viewPage0,args);

}

	}
	
	public void onDatabinding() {
		ULog.logLC("onDatabinding", this);
		super.onDatabinding();
		
	}
	
	@Override
	public void onReturn(String methodName, Object returnValue) {
		
	}

	@Override
	public void onAfterInit() {
		ULog.logLC("onAfterInit", this);
		
		onLoad();
	}
	
		@Override
	public Map<String,String> getPlugout(String id) {
		XJSON from = this.getUMContext();
		Map<String,String> r = super.getPlugout(id);
		
		return r;	
	}
	
	
	
	public View getPanel0View(final UMActivity context,IBinderGroup binderGroup) {
panel0 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_PANEL0
,"border-bottom-color","#e2e2e2"
,"background","#ffffff"
,"border-bottom-width","1"
,"width","fill"
,"valign","center"
,"layout-type","vbox"
,"halign","CENTER"
,"padding-right","10"
,"height","44"
);
label0 = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LABEL0
,"visible","false"
,"color","#e50011"
,"width","10"
,"font-size","14"
,"font-family","default"
,"valign","center"
,"layout-type","hbox"
,"halign","center"
,"content","*"
,"height","10"
);
panel0.addView(label0);
textbox0 = (UMTextbox)ThirdControl.createControl(new UMTextbox(context),ID_TEXTBOX0
,"color","#666666"
,"maxlength","256"
,"padding-left","4"
,"width","0"
,"weight","1"
,"font-size","14"
,"font-family","default"
,"placeholder","请输入需要生产二维码的内容"
,"layout-type","hbox"
,"halign","RIGHT"
,"height","fill"
);
panel0.addView(textbox0);

return panel0;
}
public View getPanel2View(final UMActivity context,IBinderGroup binderGroup) {
panel2 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_PANEL2
,"border-bottom-color","#C7C7C7"
,"border-bottom-width","1"
,"width","fill"
,"valign","center"
,"layout-type","vbox"
,"halign","LEFT"
,"height","60.0"
);
label1 = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LABEL1
,"color","#000000"
,"font-size","14"
,"valign","center"
,"widthwrap","34.0"
,"content","label"
,"bindfield","name"
,"heightwrap","20.0"
,"width","wrap"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"height","wrap"
);
panel2.addView(label1);
label2 = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LABEL2
,"color","#000000"
,"heightwrap","14.0"
,"width","wrap"
,"font-size","14"
,"font-family","default"
,"valign","center"
,"layout-type","hbox"
,"halign","center"
,"widthwrap","32.0"
,"content","label"
,"height","wrap"
);
panel2.addView(label2);
checkbox0 = (UMCheckbox)ThirdControl.createControl(new UMCheckbox(context),ID_CHECKBOX0
,"check-off-image","checkbox_noselect"
,"check-on-image","checkbox_select"
,"width","44"
,"layout-type","hbox"
,"height","44"
);
panel2.addView(checkbox0);
button1 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON1
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"font-size","17"
,"valign","center"
,"widthwrap","36.0"
,"background","#00ff00"
,"width","wrap"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"value","按钮"
,"height","44"
);
panel2.addView(button1);

return panel2;
}
public View getListviewdefine0View(final UMActivity context,IBinderGroup binderGroup) {
listviewdefine0 = (UMListViewBase)ThirdControl.createControl(new UMListViewBase(context),ID_LISTVIEWDEFINE0
,"layout","vbox"
,"bindfield","list"
,"collapsed","true"
,"width","fill"
,"valign","TOP"
,"onitemclick","action:listviewdefine0_onitemclick"
,"layout-type","vbox"
,"halign","center"
,"onitemcreate","showInfo()"
,"height","300"
);
listviewdefine0.addListItemView("getPanel2View");

return listviewdefine0;
}
public View getViewPage0View(final UMActivity context,IBinderGroup binderGroup) {
viewPage0 = (XVerticalLayout)ThirdControl.createControl(new XVerticalLayout(context),ID_VIEWPAGE0
,"background","#F7F8F8"
,"width","fill"
,"valign","TOP"
,"layout-type","vbox"
,"halign","center"
,"onload","action:viewpage0_onload"
,"height","fill"
);
image0 = (UMImage)ThirdControl.createControl(new UMImage(context),ID_IMAGE0
,"src","picture"
,"width","100"
,"scaletype","fitcenter"
,"layout-type","vbox"
,"height","100"
);
viewPage0.addView(image0);
View panel0 = (View) getPanel0View((UMActivity)context,binderGroup);
viewPage0.addView(panel0);
button0 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON0
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"onclick","action:button0_onclick"
,"font-size","17"
,"valign","center"
,"widthwrap","90.0"
,"width","wrap"
,"font-family","default"
,"layout-type","vbox"
,"halign","center"
,"value","生产二维码"
,"height","44"
);
viewPage0.addView(button0);
View listviewdefine0 = (View) getListviewdefine0View((UMActivity)context,binderGroup);
viewPage0.addView(listviewdefine0);

return viewPage0;
}
public UMWindow getCurrentWindow(final UMActivity context,IBinderGroup binderGroup) {
PuInTest = (UMWindow)ThirdControl.createControl(new UMWindow(context),ID_PUINTEST
,"layout","vbox"
,"controller","PuInTestController"
,"namespace","com.yonyou.ncmm_pac_pda"
,"width","fill"
,"valign","TOP"
,"layout-type","linear"
,"halign","center"
,"height","fill"
);
View viewPage0 = (View) getViewPage0View((UMActivity)context,binderGroup);
PuInTest.addView(viewPage0);

return (UMWindow)PuInTest;
}

	
	public void actionListviewdefine0_onitemclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "listviewdefine0_onitemclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "changeBg()",UMActivity.getViewId(control),args);
}
public void actionListviewdefine0_onitemcreate(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "listviewdefine0_onitemcreate";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "showInfo()",UMActivity.getViewId(control),args);
}
public void actionViewpage0_onload(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "viewpage0_onload";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "panel1Hide()",UMActivity.getViewId(control),args);
}
public void actionButton0_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "button0_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "this.button0_onclick()",UMActivity.getViewId(control),args);
}


}
